﻿using System;
using System.Windows.Browser;

namespace FirstFloor.P2P
{
    /// <summary>
    /// Provides arguments for value related events.
    /// </summary>
    [Scriptable]
    public class ValueEventArgs
        : EventArgs
    {
        private string value;

        /// <summary>
        /// Initializes a new instance of the <see cref="ValueEventArgs"/> class.
        /// </summary>
        /// <param name="value">The value.</param>
        public ValueEventArgs(string value)
        {
            if (value == null) {
                throw new ArgumentNullException("value");
            }
            this.value = value;
        }

        /// <summary>
        /// Gets the value.
        /// </summary>
        /// <value>The data.</value>
        [Scriptable]
        public string Value
        {
            get { return this.value; }
        }
    }
}
